package com.example.task08.school;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import java.io.Serializable;

@Data
@AllArgsConstructor
@ToString
public class Student {
    private int id;
    private String name;

    private String beanName;

    public Student(){
        System.out.println("注入Student");
    }

    public void print() {
        System.out.println(this.beanName);
    }
}
